home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d7 / commo454.arc / MACROS.TXT < prev    next >
Text File  |  1991-05-27  |  6KB  |  145 lines

  1.                   ┌───────────────────────────┐
  2.                   │ Additional Macro Examples │
  3.                   └───────────────────────────┘
  4.  
  5. This file contains a number of sample macros.  Feel free to copy any of them
  6. to COMMO.MAC and to alter them to your own needs.  Additions will be made to
  7. this file as time permits.  Thanks to the users for their contributions.
  8.  
  9. {COMMO} macros can be made to do many amazing things besides just logging into
  10. BBS's and doing mail runs (those are indeed popular functions, however).  Some
  11. of the simplest macros demonstrate this capability.
  12.  
  13.  
  14.  The next two macros are used for reading messages.  They use the grey plus
  15.  and minus keys in the lower right corner of the keyboard. The first one sends
  16.  a <cr>, then clears the screen.  Makes messages a lot easier to read since
  17.  each one starts displaying at the top of the screen.  The second macro just
  18.  sends a <cr>.  Nice for keyboards without the extra Enter key.
  19.  
  20.  Message reading macros
  21.  ───────────────────────────────────────────────────────────────────────────
  22.  {gr+}  {send |} {clear} {}
  23.  {gr-}  {send ^M} {}
  24.  
  25.  
  26.  Start my mail reader after a mail run
  27.  ───────────────────────────────────────────────────────────────────────────
  28.  {cF4}  {exen slmr} {}            SLMR
  29.  
  30.  
  31.  My generic login macro will login to most popular BBS's.  The generic login
  32.  subroutine can be called from mail run macros, etc.  The GOLOok with the
  33.  ";passwor" ignores the string "password" in the opening instructions on an
  34.  Auntie board.
  35.  
  36.  Generic login macro
  37.  ───────────────────────────────────────────────────────────────────────────
  38.  {...}  {capture y,c:\commo\commo.cap}      RBBS, PCBoard, Auntie, etc.
  39.         {asci ,} {call gls} {}
  40.  
  41.  Generic login subroutine
  42.  ───────────────────────────────────────────────────────────────────────────
  43.   {gls} {setlook 60,hng,10,|}
  44.   {li1} {golo li2,(enter)}    {golo li3,graphics (enter)}
  45.         {golo li4,first name} {golo li5,last name}
  46.         {golo li3,correct}    {golo li1,;passwor}
  47.         {lookfor password}    {send ~#|} {return}
  48.   {li2} {send ~|}        {goto li1}
  49.   {li3} {send ~y|}       {goto li1}
  50.   {li4} {send ~Fred|}    {goto li1}
  51.   {li5} {send ~Brucker|} {goto li1}
  52.  
  53.  
  54. Here is a macro to do a mail run on a PCBoard with a MarkMail door.  It will
  55. upload a reply packet if one exists (the "-u" DSZ parameter will delete it if
  56. the upload is successful), then download the new mail.  At the end it will
  57. wait for carrier detect to drop, then continue multi-number dialing.
  58.  
  59.  Motherboard mail run
  60.  ───────────────────────────────────────────────────────────────────────────
  61.  {mot} {capture y,c:\commo\mother.cap} {asci ,}
  62.        {call gls} {setlook 60,hng,6,n|}
  63.        {lookfor board command?} {setlook 90,hng}  ═ turn off prompt timer
  64.        {send open 8|} {look markmail command?}
  65.        {ifexist c:\ul\julie.rep,,mb1} {send u|}
  66.        {lookfor ^xB01} {execute DSZ port %p sz -m -u ul\julie.rep}
  67.        {lookfor command?}
  68.  {mb1} {send dg|} {golook mb2,no messages found}
  69.        {lookfor ^xB00} {call zzz} {goto ncr}
  70.  {mb2} {send g|}
  71.  {ncr} {setlook 60} {nc1} {pause 1} {ifcarrier nc1} {pause 2} {dial ,} {}
  72.  
  73.  
  74. This is my mail run macro for an RBBS with a JIMMER mail door.  If a reply
  75. packet exists, it will be uploaded.  If there is no reply packet it will
  76. download the new messages.
  77.  
  78.  Directory Assistance mail run
  79.  ───────────────────────────────────────────────────────────────────────────
  80.  {dir}  {capture y,c:\commo\dir.cap} {asci ,}
  81.         {call gls} {setlook 60,hng,5,|}
  82.         {push} {golo di5,[y],n)?}
  83.         {lookfor your command} {pops} {send open jimmer|}
  84.         {setlook 30,hng} {call di3}
  85.         {ifexist c:\ul\dirasnt.rep,,di1} {send u|}
  86.         {lookfor ^xB01} {execute DSZ port %p sz -m -u c:\ul\dirasnt.rep}
  87.         {call di3} {send g|} {goto di2}
  88.  {di1}  {send j|}
  89.         {golook ncr,no messages to download}
  90.         {setlook 180,off}
  91.         {lookfor ^xB00} {call zzz}
  92.  {di2}  {lookfor slam!} {goto ncr}
  93.  
  94.  {di3}  {golook di4,to continue>}
  95.         {lookfor your selection} {return}
  96.  {di4}  {send |} {goto di3}
  97.  {di5}  {send n|} {return}
  98.  
  99.  
  100.  Here's my latest whizbang quoting macro.  It changes the Screen Image file to
  101.  a temporary file, then goes into Scrollback.  In Scrollback I write a block
  102.  of text to disk (the quote), then exit.  My editor (QEdit) is then executed
  103.  on the temporary file.  I do what I need there to dress up the quote (like
  104.  add quoting marks, etc.).  When I save the file and exit the editor, the
  105.  macro does an ASCII Upload of the file, deletes it and restores the Screen
  106.  Image filename to what it was before.
  107.  
  108.  Quoting macro
  109.  ───────────────────────────────────────────────────────────────────────────
  110.  {cf6} {screen n,c:\dl\temp} {scroll} {exen q c:\dl\temp} {asci c:\dl\temp}
  111.        {exen del c:\dl\temp} {screen n,c:\commo\commo.scn} {}
  112.  
  113.  
  114.  This macro is a mini host mode.  It will answer on the first ring, send a
  115.  welcome message, wait for a password, then execute the batch file HOST.BAT.
  116.  When you exit back to DOS it will hang up and recycle for the next call.  A
  117.  simple version of HOST.BAT might be:
  118.  
  119.         ctty com%1
  120.         command
  121.  
  122.  Instead of CTTY you could use a program such as DoorWay by Marshall Dudley
  123.  (available as Shareware).
  124.  ───────────────────────────────────────────────────────────────────────────
  125.  {hos} {capture y,c:\commo\host.cap} {localecho y}
  126.  
  127.  {hs1} {setlook 0} {lookfor ring} {send ~~~ata|}
  128.        {golook hs2,CONNECT 1200}
  129.        {lookfor CONNECT 2400}
  130.        {parms 2400,8} {goto hs3}
  131.  {hs2} {parms 1200,8}
  132.  
  133.  {hs3} {pause 2}
  134.        {send ^L   Welcome!!!|^J^J   Enter password: }
  135.        {setlook 5,hs4}
  136.        {lookfor f} {send .}      Put your password here
  137.        {lookfor r} {send .}      (my password is "fred|", | is a cr)
  138.        {lookfor e} {send .}
  139.        {lookfor d} {send .}
  140.        {lookfor |}
  141.        {send |^J^J^J   Login complete.|^J^J   Calling host, please wait ...}
  142.        {execute c:\commo\host %p}
  143.  {hs4} {pause 1} {hangup y} {goto hs1}
  144.  
  145.